package com.niit.service.impl;

import com.niit.dao.TypeMapper;
import com.niit.pojo.ProductType;
import com.niit.service.TypeService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class TypeServiceImpl implements TypeService {
    @Autowired
    private TypeMapper typeMapper;
    @Override
    public List<ProductType> selectAllType() {
        return typeMapper.selectAllType();
    }

    @Override
    public int addType(ProductType productType) {
        return typeMapper.addType(productType);
    }

    @Override
    public int selectIdByName(String type_name) {
        return typeMapper.selectIdByName(type_name);
    }

    @Override
    public int addTypeById(String type_name) {
        return typeMapper.addTypeById(type_name);
    }
}
